import random


#python发生异常时捕获异常,并正常执行


from a import test

try:
    n = int(input("输入一个数字a:"))
    m = int(input("输入一个数字b:"))
    print("a/b={}".format(n/m))
except TypeError as e:
    print("请输入正确的数字")
except ZeroDivisionError as e:
    print(e)
else:
    print("没有发生异常")
finally:
    print("不管发生什么都执行")

test()

random.random()